/**
 * @program: My Application
 * @description: ...
 * @author: Yumaoo
 * @create: 2024-07-03 01:34
 **/
package com.example.myapplication;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class StartingScreen extends Activity {
    private Button learnButton;
    private Button locateButton;
    private Button syncButton;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.starting_screen);
    }


    public void onClick(View view) {

        Button button= (Button) view;
        Intent intent;
        int id = button.getId();

        if (id == R.id.learn_button) {
            intent = new Intent(StartingScreen.this, Buildings.class);
            startActivity(intent);
        } else if (id == R.id.locate_button) {
            intent = new Intent(StartingScreen.this, Locate.class);
            startActivity(intent);
        } else if (id == R.id.sync_button) {
            new FetchData(this).execute();
        }

    }

}
